

#ifndef __CE_POSTPROCESSRENDERER_H__
#define __CE_POSTPROCESSRENDERER_H__

#include <cegfx/ceexport.h>
#include <cegfx/ceeffect.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <cegfx/iviewport.h>

class CE_GFX_API cePostProcessRenderer
{
private:
	struct Vertex
	{
		float x, y, z;
		float u, v;
		Vertex (float x = 0, float y = 0, float z = 0, float u = 0, float v = 0)
			: x(x), y(y), z(z), u(u), v(v)
		{
		}
	};

	Vertex vertices[4];
	unsigned short indices[6];

	D3DXMATRIX	proj;

	LPDIRECT3DDEVICE9 device;
public:
	cePostProcessRenderer (LPDIRECT3DDEVICE9 device);

	void Init2D (const iViewport* viewport);

	void RenderFSQuad (LPDIRECT3DTEXTURE9 texture, ceEffect* effect, LPDIRECT3DTEXTURE9 effectTexture);
};




#endif /*! __CE_POSTPRODUCTIONRENDERER_H__ */ 
